home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
pascal
/
totsrc11.zip
/
TOTIO2.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-05-04
|
63KB
|
2,361 lines
{ Copyright 1991 TechnoJock Software, Inc. }
{ All Rights Reserved }
{ Restricted by License }
{ Build # 1.10a }
Unit totIO2;
{$I TOTFLAGS.INC}
{
Development Notes:
2/23/91 1.00a Fixed '-' '+' character validation on
RealIOOBJ and FixedRealIOOBJ
3/29/91 1.00b Added SetValue to LinkIOOBJ
4/08/91 1.00c Problem entering negative exponents in RealIOOBJ
5/20/91 1.00d Corrected right justification on IntIOOBJ and RealIOOBJ
1.00e Stopped cursor move when list field not selected
5/23/91 1.00f Added reaction to Mouse method 1
6/11/91 1.00g Corrected EraseDefault in FixedRealIOOBJ
7/2/91 1.00h Added IsNull methods to descendants of SingleLineIOOBJ
7/23/91 1.00i Corrected treatment of right-justified strings
9/04/91 1.00j Added SetNull methods to descendants of SingleLineIOOBJ
10/03/91 1.00k Removed #027 dependancy in CharIOOOBJ and FixedRealIOOBJ
11/19/91 1.00l Corrected Cursor movement problem with Erase
02/03/92 1.00m Changed decimal calc in E notation real fields
06/23/92 1.00n Fixed CharOK for Pictures during EraseDefault,
added PosCursor to SetValue, and changed
vFirstKey logic for null chars.
09/28/92 1.00o Corrected EraseDefault setting when mouse use
to change field. Updated cursor logic in fixed
real when erase default active.
01/04/93 1.10 Added MoveCursor to Display
05/03/93 1.10a Modified LISTIOOBJ.getValue to return 0 (INC file)
}
INTERFACE
uses DOS, CRT,
totSYS, totLOOK, totFAST, totSTR, totINPUT, totWIN,
totIO1, totMSG, totLINK, totReal, totDATE;
CONST
NumberError: array[1..2] of string[60] =
(' The number you entered is out of range. ',
' Enter a number in the following range: ');
DateError: array[1..6] of string[60] =
(' The date you entered is invalid. ',
' Enter a date in the format:',
' The date you entered is too early. ',
' The earliest acceptable date is: ',
' The date you entered is too late. ',
' The latest acceptable date is: ');
TYPE
pSingleLineIOOBJ = ^SingleLineIOOBJ;
SingleLineIOOBJ = object (VisibleIOOBJ)
vInsert: boolean; {is field initially in insert mode}
vRules: byte; {erasedefault, jumpiffull..... etc.}
vFirstKey: boolean; {has the user entered a key yet}
vDispChar: char; {character displayed when key is pressed}
vPad : Char; {character used to pad empty part of field}
{methods ...}
constructor Init;
procedure SetIns(InsOn:boolean);
procedure SetRules(Rules:byte);
procedure SetDispChar(Ch:char);
procedure SetPadChar(Pad:char);
procedure SetFieldAttr(Status:tStatus; var Attr:byte; var Str:string);
procedure InsertAction(InsOn:boolean); VIRTUAL;
destructor Done; VIRTUAL;
end; {SingleLineIOOBJ}
pCharIOOBJ = ^CharIOOBJ;
CharIOOBJ = object (SingleLineIOOBJ)
vFieldLen: byte;
vMaxlen : byte;
vInputStr: StrScreen;
vCursor: tCursPos; {cursleft cursright cursprevious}
vCursorStr: byte; {position of cursor in string}
vJust: tJust; {left center right}
{methods ...}
constructor Init(X,Y,FieldLen: byte);
procedure SetJust(Just:tJust);
procedure SetCursor(Curs: tCursPos);
procedure ClearMessage;
function IsNull:boolean;
procedure SetNull;
function ProcessKey(InKey:word;X,Y:byte):tAction; VIRTUAL;
function CharOK(var Ch:char): boolean; VIRTUAL;
procedure Erase; VIRTUAL;
procedure CursorEnd; VIRTUAL;
procedure CursorHome; VIRTUAL;
procedure CursorLeft; VIRTUAL;
procedure CursorRight; VIRTUAL;
procedure DeleteChar; VIRTUAL;
procedure Backspace; VIRTUAL;
procedure MoveCursor; VIRTUAL;
function ProcessEnter:tAction; VIRTUAL;
procedure ReDisplay(Status:tStatus); VIRTUAL;
procedure InitCursor; VIRTUAL; {1.00n}
procedure PosCursor; VIRTUAL;
procedure Display(Status:tStatus); VIRTUAL;
procedure ProcessChar(Ch:char); VIRTUAL;
procedure Activate; VIRTUAL;
function Select(K:word; X,Y:byte): tAction; VIRTUAL;
function Suspend:boolean; VIRTUAL;
destructor Done; VIRTUAL;
end; {object CharIOOBJ}
pStringIOOBJ = ^StringIOOBJ;
StringIOOBJ = object (CharIOOBJ)
vCase: tCase; {lower upper proper}
vForceCase: boolean; {adjust case of characters during input}
{methods ...}
constructor Init(X,Y,FieldLen: byte);
procedure SetCase(Cas:tCase);
procedure SetForceCase(On:boolean);
procedure SetValue(Str:string);
function GetValue: string;
procedure ReDisplay(Status:tStatus); VIRTUAL;
destructor Done; VIRTUAL;
end; {StringIOOBJ}
pPictureIOOBJ = ^PictureIOOBJ;
PictureIOOBJ = object (StringIOOBJ)
vPicture: string[80];
vCursorScr: byte; {position of cursor including format characters}
vAllowChar: string[40]; {allowable characters}
vDisAllowChar: string[40]; {disallowed characters}
{methods ...}
constructor Init(X,Y: byte;Pic:string);
function InputChars: byte;
function CursorOffset(InputPos:byte):byte;
procedure SetAllowChar(Str:string);
procedure SetDisallowChar(Str:string);
function GetValue: string;
function GetPicValue: string;
function CharOK(var Ch:char):boolean; VIRTUAL;
procedure Erase; VIRTUAL;
procedure CursorEnd; VIRTUAL;
procedure CursorHome; VIRTUAL;
procedure CursorLeft; VIRTUAL;
procedure CursorRight; VIRTUAL;
procedure DeleteChar; VIRTUAL;
procedure Backspace; VIRTUAL;
procedure PosCursor; VIRTUAL;
procedure InitCursor; VIRTUAL;
procedure MoveCursor; VIRTUAL;
procedure ReDisplay(Status:tStatus); VIRTUAL;
destructor Done; VIRTUAL;
end; {PictureIOOBJ}
pLateralIOOBJ = ^LateralIOOBJ;
LateralIOOBJ = object (StringIOOBJ)
vStartChar: byte; {the number of the first visible character}
{methods ...}
constructor Init(X,Y,FieldLen,MaxLen: byte);
function CursorOffset(InputPos:byte):byte;
procedure SetNull;
function GetValue: string;
procedure Erase; VIRTUAL;
procedure CursorEnd; VIRTUAL;
procedure CursorHome; VIRTUAL;
procedure CursorLeft; VIRTUAL;
procedure CursorRight;